IoT Orchestrator

← Back

⠀⠀

⠀⠀

MQTT Structure

TermExplanation
orchestratorMain daemon that monitors integrations and aggregates state updates into an object (main.go)
namespaceThe root-level path used for identifying integrations
routeThe topic of an MQTT message, showing which integration (if any) should process the message
emitterA specific type of route where data is published to
commandA route where, upon receiving a message, invokes a function in the receiving integration
fetcherA command that triggers the integration to rebroadcast its data
managed (integration)An integration started, stopped, and watched by the orchestrator. Example: kasa.js
unmanaged (integration)An integration that is not controlled by the orchestrator and only utilizes the bus. Example: ESP8266
# Orchestrator (main.go)

⠀⠀

RouteTypeDescription
/orchestratornamespaceReserved namespace for all orchestrator-related functions
/orchestrator/statusemitterStatus of all integrations as a map
/orchestrator/stateemitterState of all integrations. Entries can be null if no state was received
/orchestrator/erroremitterOrchestrator-specific error messages
/orchestrator/getdata/statusfetcherTriggers emission of status
/orchestrator/getdata/statefetcherTriggers emission of state
/orchestrator/getdata/fullStatefetcherTriggers emission of state & status
/orchestrator/integration//onlineemitterNot handled by orchestrator, integrations emit they are online (true) or not (false)
/orchestrator/integration/startcommandAttempt to start an integration (if it's managed)
/orchestrator/integration//stopcommandStop an integration (only if it's managed)

⠀⠀